﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Q.M.Sell.Doamin.Entity
{
    /// <summary>
    /// 销售订单和产品关系表
    /// </summary>
    [SugarTable("sales_product")]
    public class sales_product
    {
        /// <summary>
        /// 销售订单产品关系编号
        /// </summary>
        [SugarColumn(IsPrimaryKey = true,IsIdentity = true, ColumnDescription = "销售产品ID")]
        public int sales_productid { get; set; }

        /// <summary>
        /// 销售编号
        /// </summary>
        [SugarColumn(ColumnDescription = "销售编号", Length = 50)]
        public string? sales_number { get; set; }

        /// <summary>
        /// 产品编号
        /// </summary>
        [SugarColumn(ColumnDescription = "产品ID", Length = 50)]
        public string? productid { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        [SugarColumn(ColumnDescription = "产品名称", Length = 50)]
        public string? productname { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        [SugarColumn(ColumnDescription = "规格型号", Length = 50)]
        public string? specifications_and_models { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        [SugarColumn(ColumnDescription = "单位", Length = 50)]
        public string? unit { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        [SugarColumn(ColumnDescription = "单价")]
        public decimal price { get; set; }

        /// <summary>
        /// 数量
        /// </summary>
        [SugarColumn(ColumnDescription = "数量")]
        public int quantity { get; set; }

        /// <summary>
        /// 交付日期
        /// </summary>
        [SugarColumn(ColumnDescription = "交付日期")]
        public DateTime? date_released { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnDescription = "备注", Length = 50, IsNullable = true)]
        public string? comment { get; set; }
        /// <summary>
        ///审批字段
        /// </summary>
        [SugarColumn(ColumnDescription = "审批字段")]
        public bool examine_and_approve { get; set; } = false;
    }
}
